home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-29 | 1.4 KB | 65 lines | [TEXT/MPS ] |
- ; installation, removal, and utility routines for PAPTool patches.
- ; ©1992 Conrad Carlen & Manuel Veloso. All rights reserved.
-
- CASE OBJ
- STRING ASIS
-
- include 'Traps.a'
- include 'ToolEqu.a'
- include 'SysEqu.a'
-
-
- theFilter PROC EXPORT
- EXPORT Remove
- EXPORT Install
- EXPORT myGetA5
- movem.l d0/a0/a1, -(sp)
- lea theCodePtr, a0
- move.l (a0), a0
- jsr (a0)
- movem.l (SP)+, d0/a0/a1
- move.l nextCodePtr, -(sp)
- rts
- dc.b $80 + $9, 'theFilter'; macsbug symbol.
-
- theCodePtr ds.l 1
-
- ; prototype: void Remove(void)
-
-
- Remove lea nextCodePtr, a0 ; prep
- move.l (a0), jGNEFilter ; change it back
- rts
- dc.b $80 + $6, 'Remove' ; macsbug symbol.
- nextCodePtr ds.l 1
-
- ; prototype: void Install(FunctionPtr theProc, long a5)
- ; FunctionPtr: void (*theProc)()
-
- Install
- lea theCodePtr, a0
- move.l 4(a7), (a0) ; move the patch address into position
- lea nextCodePtr, a0 ; prep the next patch
- move.l (JGNEFilter), (a0) ; ok, got the old patchola
-
- lea theA5, a0 ; prep the a5
- move.l 8(a7), (a0) ; saved the a5
- lea theFilter, a0 ; prep our filter routine
- move.l a0, d0
- _StripAddress
- move.l d0, JGNEFilter ; allll riiiight
-
- rts
- dc.b $80 + $7, 'Install' ; macsbug symbol.
- theA5 ds.l 1
-
- ; prototype: long myGetA5(void)
-
- myGetA5
- lea theA5, a0
- move.l (a0), d0
- rts
- dc.b $80 + $7, 'myGetA5' ; macsbug symbol.
- ENDP
- END
-